package com.ccc.controller;

import com.ccc.bean.BaseRespVo;
import com.ccc.bean.Goods;
import com.ccc.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description:
 * author:houzhitao@139.com
 */
@RestController
@RequestMapping("goods")
public class GoodsController {

    @Autowired
    GoodsService goodsService;

    @RequestMapping("add")
    public BaseRespVo addGoods(Goods goods){

        Integer integer = goodsService.addGoods(goods);
        if(integer>0){
            return BaseRespVo.ok();
        }
<<<<<<< HEAD
        //return BaseRespVo.fail("插入失败");
        return BaseRespVo.ok();
=======
        System.out.println("ccc的修改");
        return BaseRespVo.fail("插入失败");
>>>>>>> ee7d235bca3daa88114a7ef57566d2d867c9df2e

    }
}
